package com.mixsmart.utils;

/**
 * 类工具类
 * @author 乌草坡
 * @since 1.0
 */
public class ClassUtils {

    /**
     * 获取默认的类加载器
     * @return
     */
    public static ClassLoader getDefaultClassLoader() {
        ClassLoader classLoader = null;
        try {
            classLoader = Thread.currentThread().getContextClassLoader();
        } catch (Throwable e) {

        }
        if(null == classLoader) {
            classLoader = ClassUtils.class.getClassLoader();
            if(null == classLoader) {
                try {
                    classLoader = ClassLoader.getSystemClassLoader();
                } catch (Throwable e) {

                }
            }
        }
        return classLoader;
    }

}
